package net.jlibrary.example.domain;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Transient;

import net.jlibrary.common.core.annotation.CodeGenComment;
import net.jlibrary.common.core.annotation.Compositor;
import net.jlibrary.common.core.annotation.SearchCondition;
import net.jlibrary.common.core.annotation.SearchField;
import net.jlibrary.common.project.domain.Dictionary;

/**
 * 示例代码：图书种类
 * @author fzys
 *
 */
@Entity
@Compositor("taxis asc,createdate desc")
@DiscriminatorValue("Classification")
@CodeGenComment(value = "图书种类", genSelect = true)
public class Classification extends Dictionary {
	private static final long serialVersionUID = 4964787706703021956L;
	
	@SearchField(value = "name", condition = SearchCondition.FUZZ_RIGHT)
	@Transient
	private String nameSearchKey;
	@SearchField(value = "code", condition = SearchCondition.EQUAL)
	@Transient
	private String codeSearchKey;
	public String getNameSearchKey() {
		return nameSearchKey;
	}
	public void setNameSearchKey(String nameSearchKey) {
		this.nameSearchKey = nameSearchKey;
	}
	public String getCodeSearchKey() {
		return codeSearchKey;
	}
	public void setCodeSearchKey(String codeSearchKey) {
		this.codeSearchKey = codeSearchKey;
	}
}
